import java.lang.reflect.Array;
import java.util.Arrays;

public class test2 {
    public static void main(String[] args) {
        int[]arr = new int[]{1,2,3,4,5,6};
        int left = 0;
        int right = arr.length-1;
        while (left<right){
            int tmp = arr[left];
            arr[left]=arr[right];
            arr[right]=tmp;
            left++;
            right--;
        }
        System.out.println(Arrays.toString(arr));
    }
}
